package com.lyxs916.widget.loadingbar;

import android.view.View;
import android.view.ViewGroup;

import com.lyxs916.widget.loading.factory.LoadingFactory;


/**
 * 说明:兼容旧版本
 * 已被 com.dyhdyh.widget.loading.bar.LoadingBar 替代
 * 作者： 杨阳; 创建于：  2017-06-08  20:14
 */
@Deprecated
public class LoadingBar {

    public static void show(View parent) {
        com.lyxs916.widget.loading.bar.LoadingBar.make(parent).show();
    }

    public static void show(View parent, final View loadingView, View.OnClickListener listener) {
        com.lyxs916.widget.loading.bar.LoadingBar.make(parent, new LoadingFactory() {
            @Override
            public View onCreateView(ViewGroup parent) {
                return loadingView;
            }
        }).setOnClickListener(listener).show();

    }

    public static void cancel(View parent) {
        com.lyxs916.widget.loading.bar.LoadingBar.cancel(parent);
    }


}
